﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using MySql.Data.MySqlClient;

public partial class Test : System.Web.UI.Page
{
    private static string connectionString = "Server=localhost; Database=shhecomsg_db; Uid=shhecomsg_us1; Pwd=3ybU86r8LAEn;";

    protected void Page_Load(object sender, EventArgs e)
    {
        //http://exceldatareader.codeplex.com/
    }

    protected void btnTestConnection_Click(object sender, EventArgs e)
    {
        try
        {
            MySqlConnection con = new MySqlConnection(connectionString);
            MySqlCommand cmd = new MySqlCommand("SELECT * from users", con);
            using (con)
            {
                con.Open();
                //MySqlDataReader reader = cmd.ExecuteReader();
                //while (reader.Read())
                //{
                //}
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}
